<div class="layui-header">
  <div class="layui-logo layuiis1">酒店管理系统</div>
  <!-- 头部区域（可配合layui已有的水平导航） -->
  <ul class="layui-nav layui-layout-left">
    <li class="layui-nav-item"><a href="/">控制台</a></li>
    <% if(!username){ %>
      <li class="layui-nav-item"><a href="/users/login">登录</a></li>
      <li class="layui-nav-item"><a href="/users/register">注册</a></li>
     <% } %>
    <li class="layui-nav-item">
      <a href="javascript:;">其它系统</a>
      <dl class="layui-nav-child">
        <dd><a href="/">邮件管理</a></dd>
        <dd><a href="/">消息管理</a></dd>
        <dd><a href="/">授权管理</a></dd>
      </dl>
    </li>
  </ul>
  <ul class="layui-nav layui-layout-right">
    <% if(username){ %>
    <li class="layui-nav-item">
      <a href="javascript:;">
        <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
        <%- username %>
      </a>
      <dl class="layui-nav-child">
        <dd><a href="">基本资料</a></dd>
        <dd><a href="">安全设置</a></dd>
      </dl>
    </li>
    <li class="layui-nav-item"><a href="/logout">退了</a></li>
    <% } %>
  </ul>
</div>

<div class="layui-side layui-bg-black">
  <div class="layui-side-scroll">
    <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
    <ul class="layui-nav layui-nav-tree" lay-filter="test">
      <li class="layui-nav-item layui-nav-itemed">
        <a class="" href="javascript:;">房间管理</a>
        <dl class="layui-nav-child">
          <dd><a onclick="location.href='/room/roomadd'">添加房间详情</a></dd>
          <dd><a onclick="location.href='/room/roomlist'">查看所有房间</a></dd>
          <dd><a href="javascript:;">编辑房间详情</a></dd>
          <!-- <dd><a href="">超链接</a></dd> -->
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;">员工管理</a>
        <dl class="layui-nav-child">
          <dd><a href='/staff_insert'>添加人员详情</a></dd>
          <dd><a href="/users/list">查看所有员工</a></dd>
          <dd><a href="/users/list/set">编辑人员详情</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;">房屋预订</a>
        <dl class="layui-nav-child">
          <dd><a href="/newkehu">新订</a></dd>
          <dd><a href="/kehulist">查看预订</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item"><a href="/users/client?username=<%- username %>">聊天室</a></li>
      <li class="layui-nav-item"><a href="">发布商品</a></li>
    </ul>
  </div>
</div>
<script src="/layui/layui.js"></script>
<script>
  //JavaScript代码区域
  layui.use('element', function () {
    var element = layui.element;

  });
  document.querySelector('.layuiis1').onclick = function () {
    // open('/')
    location.href = "/"
  }
</script>